home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / C / Mesa / demos / Smakefile < prev    next >
Encoding:
Makefile  |  1997-06-25  |  2.6 KB  |  95 lines

  1. # SMakefile for demo programs
  2.  
  3. # Mesa 3-D graphics library
  4. # Version:  1.2
  5. # Copyright (C) 1995  Brian Paul  (brianp@ssec.wisc.edu)
  6. #
  7. # This library is free software; you can redistribute it and/or
  8. # modify it under the terms of the GNU Library General Public
  9. # License as published by the Free Software Foundation; either
  10. # version 2 of the License, or (at your option) any later version.
  11. #
  12. # This library is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15. # Library General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Library General Public
  18. # License along with this library; if not, write to the Free
  19. # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. ##### MACROS #####
  22.  
  23. INCDIR = /include
  24. GL_LIB = MesaGL.LIB
  25. GLU_LIB = MesaGLU.LIB
  26. TK_LIB = Mesatk.LIB
  27. AUX_LIB = Mesaaux.LIB
  28.  
  29. TMP_FILE = T:MesaTMP_SCOPTS
  30.  
  31.  
  32. #AMIWIN 
  33. XLIBS = X11.LIB
  34. XDIR = x11:sasc
  35. NET_INC = netinclude:
  36. NET_LIB = netinclude:/netlib/net.lib
  37.  
  38. AMIWINGL_LIBS = lib lib:sc.lib+lib:scm881.lib+lib:scmieee.lib+$(NET_LIB)+$(XDIR)/lib/$(XLIBS)+/lib/$(AUX_LIB)+/lib/$(TK_LIB)+/lib/$(GLU_LIB)+/lib/$(GL_LIB)
  39. AMIGAGL_LIBS =  lib lib:sc.lib+/lib/$(AUX_LIB)+/lib/$(TK_LIB)+/lib/$(GLU_LIB)
  40.  
  41.  
  42. PROGS = bounce gamma gears glxdemo glxpixmap isosurf offset osdemo shadow \
  43.     spin test0 wave xdemo
  44.     
  45. # Missing in Amiga version is :glxdemo,glxpixmap,xdemo, offset    reflect tess_demo texobj vgears vindex vtest winpos
  46. AMIGAPROGS = bounce gamma gears isosurf osdemo spin test0 
  47.  
  48. CC = sc
  49.  
  50. AMIWINSCFLAGS = idir=$(NET_INC) idir=$(INCDIR) idir=$(XDIR)/include data=far idlen=63 \
  51.           nostkchk IGN=ALL math=68882 cpu=68040 optimize define=AMIWIN
  52.  
  53. AMIGASCFLAGS = idir=$(INCDIR) data=far idlen=63 with=/amiga/SCOPTIONS\
  54.           IGN=ALL define=AMIGA
  55.  
  56.  
  57. ##### TARGETS #####
  58.  
  59. default:
  60.     @echo "specify: smake <target>"
  61.     @echo "Where <targets> is one of"
  62.     @echo "       amiga   - Compiles using link library"
  63.     @echo "       library - Compiles using standard library (still beta)"
  64.     @echo "       targets - Compilations for AMIWIN"
  65.     smake amiga
  66.  
  67. clean:
  68.     -delete *.o *.lnk *.info
  69.  
  70. realclean: 
  71.     -delete $(PROGS)
  72.     -delete *.o *.lnk *.info
  73.  
  74. amiga: AmigaLIB $(AMIGAPROGS) DeleteTMP
  75.  
  76. library: AmigaLibrary $(AMIGAPROGS) DeleteTMP
  77.  
  78. targets: AMIWIN $(PROGS) DeleteTMP
  79.  
  80.  
  81. AmigaLIB:
  82.     @echo >$(TMP_FILE) "$(AMIGASCFLAGS) define=AMIGALIB $(AMIGAGL_LIBS)+/lib/$(GL_LIB)"
  83.  
  84. AmigaLibrary:
  85.     @echo >$(TMP_FILE) "$(AMIGASCFLAGS) $(AMIGAGL_LIBS)"
  86.  
  87. AMIWIN:
  88.     @echo >$(TMP_FILE) "$(AMIWINSCFLAGS) $(AMIWINGL_LIBS)"
  89.  
  90. DeleteTMP:
  91.     @delete $(TMP_FILE)
  92.  
  93. $(PROGS):
  94.     $(CC) WITH=$(TMP_File) link $>.c
  95.